<?php
if (isset($aNews) && count($aNews) > 0) {
    foreach ($aNews as $key => $item):
        $parent_cate_url = "";
        if ($item->parent_cate_url != "")
            $parent_cate_url = $item->parent_cate_url . "/";                    
?> 
    <article class="block-article ">
        <?php
        if (strpos(strtolower($item->img_thumb2),'.jpg') !== false
                || strpos(strtolower($item->img_thumb2),'.jpeg') !== false
                || strpos(strtolower($item->img_thumb2),'.png') !== false){
        ?>
        <a class="thumbs img_165_93" href="<?php echo $base_url . $parent_cate_url . $item->news_cate_url . "/" . $item->url . "-" . $item->news_id; ?>.html">
            <img src="<?php echo $img_url; ?>style/<?php echo $item->img_thumb2; ?>" alt="<?php echo $item->title; ?>"> </a>
        <?php 
        }
        ?>
        <h3><a href="<?php echo $base_url . $parent_cate_url . $item->news_cate_url . "/" . $item->url . "-" . $item->news_id; ?>.html">
            <?php echo $item->title; ?><span class="icon-photos"></span></a>
        </h3>
        <p><?php echo $item->short_desc; ?></p>
    </article>                
<?php
        $parent_cate_url = "";
    endforeach;
}
?>  